package Animal;

public class Test {
    public static void main(String[] args) {
        Cat cat=new Cat("小猫");
        walk(cat);

        Frog frog=new Frog("小青蛙");
        walk(frog);

        Robot robot=new Robot("机器人");
        walk(robot);
    }

    public static void walk(IRunning running){
        System.out.println("我带着伙伴去散步");
        running.run();
    }
}
